import router from "@router";
//引入nprogress进度条-t
import NProgress from 'nprogress' // 进度条
import 'nprogress/nprogress.css' //这个样式必须引入

NProgress.inc(0.2);
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false });
//引入nprogress进度条-e

router.beforeEach((to,from,next) => {
  NProgress.start();
  next()
});

router.afterEach(() => {
  NProgress.done();
});
